package com.example.pingxue.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

import java.util.Set;

@Entity
@Getter
@Setter
public class Course extends LogicEntity{
    @Column
    private String courseName;
    @Column
    private Integer creditHours;
    @Column
    private String credit;

    @OneToMany(mappedBy = "course",
            fetch = FetchType.LAZY,
            cascade = CascadeType.ALL
    )
    @JsonIgnoreProperties("course")
    private Set<TClass> clses;

    public Course() {}
    public Course(String name, String code) {

    }
}
